/* 
 * File:   LayoutMakerFacade.cpp
 * Author: claudio
 * 
 * Created on October 9, 2012, 5:07 PM
 */

#include "LayoutMakerFacade.h"

LayoutMakerFacade::LayoutMakerFacade(int width, int height, int alpha, int beta, int L) {
    image_list = new vector<Image*>();
    setWidth(width);
    setHeight(height);
    setAlpha(alpha);
    setBeta(beta);
    setL(L);
    bric = new BRIC(width, height, alpha, beta, L); //, scorer_priority);
}

LayoutMakerFacade::LayoutMakerFacade(const LayoutMakerFacade& orig) {
}

LayoutMakerFacade::~LayoutMakerFacade() {
}
void LayoutMakerFacade::addImage(Image* img){
    image_list->push_back(img);
}
Node* LayoutMakerFacade::renderSolution(){
    Node* root = bric->create_tree(image_list);
    bric->solve(root);
    return root;
//    return renderer->draw_tree(root);
}

void LayoutMakerFacade::setL(int L) {
    this->L = L;
}

int LayoutMakerFacade::getL() const {
    return L;
}

void LayoutMakerFacade::setBeta(int beta) {
    this->beta = beta;
}

int LayoutMakerFacade::getBeta() const {
    return beta;
}

void LayoutMakerFacade::setAlpha(int alpha) {
    this->alpha = alpha;
}

int LayoutMakerFacade::getAlpha() const {
    return alpha;
}

void LayoutMakerFacade::setHeight(int height) {
    this->height = height;
}

int LayoutMakerFacade::getHeight() const {
    return height;
}

void LayoutMakerFacade::setWidth(int width) {
    this->width = width;
}

int LayoutMakerFacade::getWidth() const {
    return width;
}
